package com.shiyanlou.upms.system.dao;

import com.shiyanlou.upms.system.domain.UpmsUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UpmsUserRoleMapper {
    int deleteByPrimaryKey(Integer userRoleId);

    int insert(UpmsUserRole record);

    int insertSelective(UpmsUserRole record);

    UpmsUserRole selectByPrimaryKey(Integer userRoleId);

    int updateByPrimaryKeySelective(UpmsUserRole record);

    int updateByPrimaryKey(UpmsUserRole record);

    // 总记录数
    int count(Map<String, Object> map);

    // 分页列表
    List<UpmsUserRole> list(Map<String, Object> map);
    /**
     * 删除用户角色关系
     * @param roleId
     * @param userId
     * @return
     */
    int deleteByUserRole(@Param("roleId")Integer roleId, @Param("userId")Integer userId);
}